package com.virus.server;

import com.virus.server.classloader.CommonClassLoader;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class BootStrap {

    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException {
        CommonClassLoader commonClassLoader = new CommonClassLoader();
        Class<?> aClass = commonClassLoader.loadClass("com.virus.server.catalina.Server");
        Thread.currentThread().setContextClassLoader(commonClassLoader);
        Object o = aClass.newInstance();
        Method start = aClass.getMethod("start");
        start.invoke(o);
        }
        }
